import request from "@/utils/request";

// 查询院系列表
export function listJuanDepartment(query) {
  return request({
    url: "/system/juanDepartment/list",
    method: "get",
    params: query,
  });
}

// 查询院系详细
export function getJuanDepartment(departId) {
  return request({
    url: "/system/juanDepartment/" + departId,
    method: "get",
  });
}

// 新增院系
export function addJuanDepartment(data) {
  return request({
    url: "/system/juanDepartment",
    method: "post",
    data: data,
  });
}

// 修改院系
export function updateJuanDepartment(data) {
  return request({
    url: "/system/juanDepartment",
    method: "put",
    data: data,
  });
}

// 删除院系
export function delJuanDepartment(departId) {
  return request({
    url: "/system/juanDepartment/" + departId,
    method: "delete",
  });
}

// 获取所有院系列表
export function getMajorDepNameList(query) {
  return request({
    url: "/system/juanDepartment/getMajorDepNameList",
    method: "get",
    params: query,
  });
}

